home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc51bugs.zip / Q32305 < prev    next >
Text File  |  1988-07-21  |  898b  |  42 lines

  1. Q32305 Error C2126 Repeated
  2. C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Problem:
  7.    When the following program is compiled with the default options,
  8. the error C2126 "automatic allocation exceeds 32K" is repeated four
  9. times:
  10.  
  11. #define LINT_ARGS
  12. #include <limits.h>
  13. #include <malloc.h>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16.  
  17. main(void)
  18. {
  19.     long  k;
  20.     int   i;
  21.     char *q;
  22.     char *p[30000];
  23.  
  24.     i = 0;
  25.     do
  26.       p[i++] = (char *)malloc((size_t)K);
  27.     while (q != NULL);
  28.     return 0;
  29. }
  30.  
  31. Response:
  32.    This error message is supposed to appear, but it should appear only
  33. once. Make the variable p a global array to avoid the error(s).
  34.    Microsoft has confirmed this to be a problem in Version 5.10 of the
  35. C compiler. We are researching this problem and will post new
  36. information as it becomes available.
  37.  
  38.  
  39.  
  40. Keywords:  buglist5.10
  41. Updated  88/07/21 03:19
  42.